<?php
/**
 * TOP API: taobao.tbk.sc.relation.record request
 * 
 * @author auto create
 * @since 1.0, 2021.05.26
 */
class ItaokeScRelationSaveRequest
{
	/** 
	 * 淘宝客自有私域用户自定义标记，如自有私域系统账号标记等
	 **/
	private $externalId;
	
	/** 
	 * 淘宝客其他平台私域用户自定义标记，1-微信、2-微博、3-抖音、4-快手、5-QQ，0-其他
	 **/
	private $externalType;
	
	/** 
	 * 授权类型，选2时可用于更新外部用户标记，默认1：1-新绑，2-更新
	 **/
	private $opType;
	
	/** 
	 * 会员备案授权后，跳转的目标页地址
	 **/
	private $redirectUrl;
	
	/** 
	 * 人群标签ID，用户备案授权后会自动添加到该人群
	 **/
	private $ucrowdId;
	
	private $apiParas = array();
	
	public function setExternalId($externalId)
	{
		$this->externalId = $externalId;
		$this->apiParas["external_id"] = $externalId;
	}

	public function getExternalId()
	{
		return $this->externalId;
	}

	public function setExternalType($externalType)
	{
		$this->externalType = $externalType;
		$this->apiParas["external_type"] = $externalType;
	}

	public function getExternalType()
	{
		return $this->externalType;
	}

	public function setOpType($opType)
	{
		$this->opType = $opType;
		$this->apiParas["op_type"] = $opType;
	}

	public function getOpType()
	{
		return $this->opType;
	}

	public function setRedirectUrl($redirectUrl)
	{
		$this->redirectUrl = $redirectUrl;
		$this->apiParas["redirect_url"] = $redirectUrl;
	}

	public function getRedirectUrl()
	{
		return $this->redirectUrl;
	}

	public function setUcrowdId($ucrowdId)
	{
		$this->ucrowdId = $ucrowdId;
		$this->apiParas["ucrowd_id"] = $ucrowdId;
	}

	public function getUcrowdId()
	{
		return $this->ucrowdId;
	}

	public function getApiMethodName()
	{
		return "itaoke.sc.relation.save";
	}
	
	public function getApiParas()
	{
		return $this->apiParas;
	}
	
	public function check()
	{
		
	}
	
	public function putOtherTextParam($key, $value) {
		$this->apiParas[$key] = $value;
		$this->$key = $value;
	}
}
